package com.whu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tbl_product")
public class Product {

    private Long id;

    private String name;

    private String description;

    private float money;

    @TableField(exist = false)
    private List<Supplier> suppliers;

    public Product(String name, String description, float money) {
        this.name = name;
        this.description = description;
        this.money = money;
    }

    public Product(String name, String description, float money, List<Supplier> suppliers) {
        this.name = name;
        this.description = description;
        this.money = money;
        this.suppliers = suppliers;
    }
}
